<{include file="admin_header.html"}>
<body>  
<form name="myform" method="post" action="">
 <input type="hidden" name="selids" value=""/>
<table class="tab_list tab_bottom">
    <caption><a href="#">◆分类管理</a> <a class='add fn-right' href='<{spUrl c=newscategories a=add}>'>添加</a></caption>
    <tr>
        <th class="checkbox"><input name="checkbox" type="checkbox" onclick="checkorno(this,this.form.catids)" /></th>
        <th>名称</th>
        <th>排序</th>
        <th class="td_action">操作</th>
    </tr>
<{function name=menu level=0}> 
<{for $i=0 to $i<$level*2-1}>    
<{$str=$str|cat:'　'}>
<{/for}>
<{if $level++}>
<{$str2= $str|cat:'├'}>
<{/if}>    
<{foreach $data as $entry}> 
    <tr>
        <td class="checkbox"><input type="checkbox" name="catids" id="catids" value="<{$entry.categories_id}>"/></td>
        <td><{$str2}> [<{$entry.categories_id}>.<{$entry.detail.categories_name}>]<{if isset($entry.child)}>+<{else}><a href='<{spUrl c=news a=index categories_id=$entry.categories_id}>'>列表</a><{/if}> </td>
        <td><input class="num" name="orderid[<{$entry.categories_id}>]" type="text" value="<{$entry.sort_order}>"/></td>
        <td class="td_action">
        <{if !isset($entry.child)}> <a href='<{spUrl c=news a=add categories_id=$entry.categories_id}>'>添加信息</a> <{/if}>|<a class='add' href='<{spUrl c=newscategories a=add categories_id=$entry.categories_id}>'>添加分类</a> <a class='add' href='<{spUrl c=newscategories a=edit categories_id=$entry.categories_id}>'>修改</a> | <a href="<{spUrl c=newscategories a=del categories_id=$entry.categories_id}>" onClick="return confirm('确认删除吗？')">删除</a>
        </td>
    </tr>
    
<{if isset($entry.child)}>         
<{call name=menu data=$entry.child level=$level}>           
<{/if}>             

<{/foreach}>     

<{/function}> 
<{call name=menu data=$arr}> 
    
    
</table>
<div id="submit_float">
<button name="select1" onClick="selAll(this.form.catids)" type="button">全选</button>
   <button name="select2" onClick="noSelAll(this.form.catids)" type="button">反选</button>
   <button name="order" type="button" onClick="subform(this.form,this.form.catids,'<{spUrl c=newscategories a=order}>','')">栏目排序</button>
   <button name="order" type="button" onClick="subform(this.form,this.form.catids,'<{spUrl c=newscategories a=del}>','')">删除选中</button>
   <button name="reset" type="reset">重置</button>
</div>
</form>

<{include file="admin_footer.html"}>
</body>
</html>